<?php //$Rev:: 55         $ // DO NOT REMOVE

//
// THIS FUNCTION IS REQUIRED FOR ATAC TO RUN, DO NOT REMOVE!!!
//
function away_setAway(&$obj, $data)
{
    if ($obj->core->utilities->aim_is_admin($data['screenname'])) {
        $obj->core->utilities->aim_set_away($data['message_text']);
    } else {
        $obj->core->utilities->aim_send_im($data['screenname'], 'You are not authorized to the requested command', true);
    }
}

function nick_formatNick(&$obj, $data)
{
    if ($obj->core->utilities->aim_is_admin($data['screenname'])) {
        $obj->core->utilities->aim_format_sn($data['message_text']);
    } else {
        $obj->core->utilities->aim_send_im($data['screenname'], 'You are not authorized to the requested command', true);
    }
}

function exit_killATAC(&$obj, $data)
{
    if ($obj->core->utilities->aim_is_admin($data['screenname'])) {
        $obj->core->utilities->aim_send_im($data['screenname'], 'Signing off...', true);
        sleep(1);
        $obj->core->aim_disconnect();
    } else {
        $obj->core->utilities->aim_send_im($data['screenname'], 'You are not authorized to the requested command', true);
    }
}

function about_aboutATAC(&$obj, $data)
{
    $msg = 'ATAC is (c)' . date('Y', time()) . ' Andrew Heebner.  ';
    $msg.= 'My local version is <b>' . $obj->core->apiVersion() . '</b>.  I\'m being run on PHP <b>' . phpversion() . '/' . PHP_OS;
    $msg.= '</b>.  My unique installation ID is <b>' . $obj->core->user['uuid'] . '</b>.';

    if ($data['message_type'] == AIM_MSG_CHAT) {
        $obj->core->chat->aim_chat_send($data['cid'], $msg);
    } else {
        $obj->core->utilities->aim_send_im($data['screenname'], $msg, true);
    }
}

?>